package com.zatech.cgnci.project.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @author EDY
 * @version 1.0
 * Create by 2024/12/18 14:39
 */
@Data
@ApiModel(value = "CodeTypeAddDTO")
public class CgnciCodeTypeAddDTO {

    @ApiModelProperty(value = "上级编码")
    @NotBlank(message = "上级编码不能为空")
    private String codeHigherLevelCode;

    @ApiModelProperty(value = "上级名称")
    @NotBlank(message = "上级名称不能为空")
    private String codeHigherLevelName;

    private List<SubCodeTypeDTO> subCodeTypeDTOList;

    @Data
    public static class SubCodeTypeDTO {

        @ApiModelProperty(value = "编码")
        @NotBlank(message = "编码不能为空")
        private String codeCode;

        @ApiModelProperty(value = "名称")
        @NotBlank(message = "名称不能为空")
        private String codeName;

        @ApiModelProperty(value = "是否启用（1-启用,0-不启用）")
        private String codeState;

        @ApiModelProperty(value = "备注")
        private String codeRemark;
    }
}
